<table class="datagrid" id="gridInvoiceSearch">
  <thead class="datagrid">
    <tr>
      <th style="width:50px;">Issued on</th>
      <th style="width:100px;">Invoice</th>
      <th style="width:200px;">Invoice Name</th>
      <th style="width:75px;text-align:right;">Total</th>
      <th style="width:75px;text-align:right;">Debit</th>
      <th style="width:75px;text-align:right;">Credit</th>
      <th style="width:75px;text-align:right;">Payment</th>
      <th style="width:75px;text-align:right;">Others</th>
      <th style="width:75px;text-align:right;">Balance</th>
      <th style="width:20px;text-align:center;">Void</th>
      <th style="width:16px;"></th>
    </tr>
  </thead>
  <tbody class="datagrid" style="height:200px;">
    <?php foreach($invoices as $invoice):?>
    <tr id="<?php echo 'row_invoice_'.$invoice->getInvoiceIden()?>">
      <?php include_partial('invoice_grid_td',array('invoice'=>$invoice,))?>
    </tr>
    <?php endforeach;?>
  </tbody>
</table>

<script language="javascript">
  $(document).ready(function(){
    if(invoiceDialogMode==0)
      invoiceSetupSearchGridSelect();
  });
</script>